using System;
using System.Collections.Generic;
using System.Text;
using SystemFunctionLib.Apis;

namespace SystemFunctionLib.SystemEnvironment
{
    /// <summary>
    /// Contains the functions to process system date and time.
    /// </summary>
    /// <remarks>
    /// Time zone settings are not included because it is already internally supported by .NET 3.5.
    /// </remarks>
    public class SystemDateTime
    {
        /// <summary>
        /// Gets or sets the current local date and time.
        /// </summary>
        public static DateTime LocalDateTime
        {
            get
            {
                return DateTime.Now;
            }
            set
            {
                SYSTEMTIME time = SYSTEMTIME.FromDateTime(value);
                WinApis.SetLocalTime(ref time);
            }
        }
    }
}
